Local networks are most often organized around a central device, called gateway. The gateway is then the mandatory passage for communications between the local network or LAN (Local Area Network) and devices in the external network or WAN (Wide Area Network). Current developments show that gateways, especially in a home network environment, play an ever increasing centralized role. With the widespread deployment of gateways and the number of network-connected devices in the home network, gateways are becoming interesting targets for hackers. Home networks typically comprise one or more of the following devices interconnected to the gateway via USB (Universal Serial Bus), Ethernet or WiFi connectivity: Personal Computers (PCs), wireless telephone sets, IPTV (Internet TeleVision) Set Top Boxes (IPTV STBs), DLNA (Digital Living Network Alliance) television sets, and mass-storage devices. To protect the home network devices from attacks, the gateway's security measures are most often reduced to the presence of individual antivirus and/or firewall functions on the PCs. The security of the home network further profits from a Network Address Translation (NAT) feature in the gateway, a feature that allows to distribute network addresses to devices in the home network, which addresses are unknown outside the home network. The use of a NAT feature results in hiding the individual addresses of the devices in the local network to devices on the external network. Thus, this means that only a limited protection is provided for the gateway itself and for the other connected devices not being equipped with antivirus and/or firewall software. Among others, the access to the gateway for home network administration purposes is done via a web-based application running on a web-browser application in the gateway, and it is well-known that web servers are vulnerable to security flaws. Vulnerability in the web-browser can then give a hacker access to not secured devices connected in the home network, and can give a hacker even access to all communication between devices of the home network and the external network, because all the communication between the home network and the external network and vice versa passes through the gateway.
Users that want to configure their gateway, for example to change or enter a security key for wireless access, e.g. WPA (Wi-Fi Protected Access), or configure NAT port mappings, or to configure local file sharing between the devices connected to the gateway usually have to log in on a web application of the gateway. Such a web application is accessible via for example HTTP of HTTPS protocol, one of the protocols of the Internet Protocol Suite, that is situated in the Application Layer (the Internet Protocol comprises a Link-, an Internet-, a Transport- and an Application Layer; examples of link layer protocols are ARP, DSL; examples of Internet layer protocols are IP, IGMP; examples of transport layer protocols are TCP, UDP; examples of application layer protocols are HTTP/HTTP as mentioned, but also DHCP, RTP, SOAP, SSH). Once successfully authenticated they will be assigned a session that is identified by a session identifier or session-ID. All requests that use the session identifier will then considered as ‘safe’ and be processed by the web server on the gateway, whereby the access rights are limited to the rights associated with the user. A malicious hacker will thus try to get hold of such a session-ID, e.g. by spying on communications between the gateway and the devices connected to it, or by getting access to information stored by the web browser and extract any stored session IDs, and then use the obtained session IDs to get access to devices, data and/or services. This technique is known as session-stealing.
Various mechanisms are put in place to prevent session-stealing. For example, session-IDs are randomly generated to make them unpredictable, web-browsers refuse access to cookies in which session-IDs are stored from code running in the context of another web-site than the web-site that obtained the session-ID, session-IDs are deleted after an idle time-out. Nevertheless, there always remains a possibility of a valid session-ID being stolen. In such a case it would be useful to have an additional protection mechanism that limits the usefulness of the session ID.
A well-known protection mechanism is to lock the session to an IP address of the origin of the first request. In practice, this causes session loss for example for users that access the web server via proxy server farms, load balancers, or NATs. For such users, their IP address can legitimately change between several requests.
There is thus a need for better way of securing the network devices from malicious attacks that target to get control of a gateway or of one or more devices connected to the gateway, that does not have the drawbacks of prior art.